package com.jungle.sp.daily.service;

import com.jungle.sp.daily.config.VirtualThreadPoolConfig;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.concurrent.ExecutorService;

/**
 * @author 86189
 */
@RequiredArgsConstructor
@Service
public class MyService {

    private final ExecutorService virtualThreadPool;
    private final VirtualThreadPoolConfig config;

    public void executeTaskWithContext(String context) {
        config.executeWithContext(context, virtualThreadPool);
    }
}